<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<link rel="stylesheet" href="js/bootstrap-3.3.7-dist/css/bootstrap.min.css">

	<link rel="stylesheet" href="js/bootstarp-table-1.11.1/bootstrap-table.min.css">

	<script src="js/jquery-3.3.1.min.js"></script>

	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

	<script src="js/bootstarp-table-1.11.1/bootstrap-table.min.js"></script>

	<script src="js/bootstarp-table-1.11.1/bootstrap-table-zh-CN.min.js"></script>

</head>
<style type="text/css">
	#pic{
		border:1px solid #000000;
		width:200px;
		height:200px;
		margin: 0px auto 0px auto;
		align-content: center;
		text-align: center;
		float: left;
	}
	.container{
		width: 800px;
		margin: 30px auto;
	}
</style>
<body style="margin: 30px;">
<div class="container">
	<form th:action="@{|/upload|}" id="uploadForm" method="post" enctype="multipart/form-data">
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;图片
			</label>
			<div class="col-sm-6" >
				<div id="pic">
					<img th:src="${uploadImageKey}" width="180px" height="180px" />
				</div>
				<input type="file" id="fileName" name="img" >
			</div>
		</div>
	</form>
</div>
<div class="container">
	<form action="/add" method="post" class="form-horizontal" role="form" name="myfrom" id="myfrom">
		<input type="text" hidden="hidden" th:value="${uploadImageKey}" id="imgUrl" name="imgUrl">
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">排序</label>
			<div class="col-sm-6">
				<input type="text" class="form-control" name="sort" id="sort" >
			</div>
		</div>
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">图片跳转链接</label>
			<div class="col-sm-6">
				<input type="text" class="form-control" name="linkUrl" id="linkUrl" placeholder="如：www.baidu.com">
			</div>
		</div>
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">首写字母</label>
			<div class="col-sm-6">
				<input type="text" name="initial" id="initial" class="form-control">
			</div>
		</div>
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">IP名称</label>
			<div class="col-sm-6">
				<input type="text" name="ipName" id="ipName" class="form-control">
			</div>
		</div>
<!--		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">IP描述</label>
			<div class="col-sm-6">
				<input type="text" name="describe" id="describe" class="form-control">
			</div>
		</div>-->
		<div class="form-group">
			<label for="inputEmail3" class="col-sm-2 control-label">类型</label>
			<div class="col-sm-6">
				<select class="form-control" name="type" id="type">
					<option value="-1">-请选择-</option>
					<option value="1">创意家居</option>
					<option value="2">生活百货</option>
					<option value="3">时尚配饰</option>
					<option value="4">数码配件</option>
					<option value="5">儿童玩具</option>
					<option value="6">童装童鞋</option>
					<option value="7">成人鞋服</option>
					<option value="8">IP授权</option>
					<!--<option value="9">世界之旅</option>-->
					<option value="10">动漫IP</option>
					<option value="11">影视IP</option>
					<option value="12">游戏IP</option>
					<option value="13">小说IP</option>
				</select>
			</div>
		</div>
		<input type="hidden"  id="eid1" name="eid1" />
		<div class="modal-footer">
			<button type="button" id="button1" class="btn btn-default1" data-dismiss="modal" onclick="goback()">取消</button>
			<!-- <input type="submit" class="btn btn-primary" id="sub1" value="提交" /> -->
			<button type="submit" class="btn btn-primary" id="sub1" data-dismiss="modal">提交</button>
		</div>
	</form>
</div>
</body>
<script>
    $("#fileName").change(function(e) {
        $("#uploadForm").submit();
    })
    function  goback() {
        console.log("====================");
        window.location.href="tohome";
    }
</script>
</html>




